<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2023/1/31
  Time: 16:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
  <c:set var="name" value="zhangsan" scope="request"></c:set>
  <c:set var="balance" value="2000" scope="request"></c:set>
  <h3>${name}</h3>
  <hr />
  <c:if test="${not empty name}">
      <h1>欢迎：${name}</h1>
  </c:if>

  <c:if test="${empty name}">
      <h1>欢迎：xxx</h1>
  </c:if>

  <c:choose>
      <c:when test="${balance < 1000}">
          <h3>初级程序员</h3>
      </c:when>
      <c:when test="${balance gt 1000 && balance lt 5000}">
          <h3>中级程序员</h3>
      </c:when>
      <c:when test="${balance gt 5000 && balance lt 10000}">
          <h3>高级程序员</h3>
      </c:when>
      <c:otherwise>
          <h3>技术经理</h3>
      </c:otherwise>
  </c:choose>
</body>
</html>
